﻿using System;
using GeoAPI.Geometries;

namespace NetTopologySuite.Triangulate
{
	public class MidpointSplitPointFinder : IConstraintSplitPointFinder
	{
		public Coordinate FindSplitPoint(Segment seg, Coordinate encroachPt)
		{
			Coordinate start = seg.Start;
			Coordinate end = seg.End;
			return new Coordinate((start.X + end.X) / 2.0, (start.Y + end.Y) / 2.0);
		}
	}
}
